package xpn.business.fund_return.entity.return_funds_report;

import org.springframework.data.rest.webmvc.RepositoryRestController;
import org.springframework.web.bind.annotation.*;
import xpn.platform.common.repository.XpnRepositoryController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RepositoryRestController
@RequestMapping("returnFundsReport")
public class ReturnFundsReportController extends XpnRepositoryController<ReturnFundsReport, Long> {

    @Resource
    private ReturnFundsReportService returnFundsReportService;

    @Resource
    ReturnFundsReportDao returnFundsReportDao;

    @PostMapping("")
    public ReturnFundsReport saveReturnFundsReport(@RequestBody ReturnFundsReport returnFundsReport) {
        return returnFundsReportService.save(returnFundsReport);
    }

    @GetMapping("")
    public List<Map<String, Object>> test(){
        List<Map<String, Object>> queryResult = returnFundsReportDao.queryTest();
        return queryResult;
    }
}
